import React, {Component} from 'react';
import Store from "../../../ReactReaux/store/cart_store"
class ReduxTwo extends Component {
    constructor(props) {
        super(props);
        console.log(Store.getState().productArray)
        this.state={
            dataArray:Store.getState().productArray,
        }
    }
    render() {
        return (
            <div>
                <h1>这是two</h1>
                {
                    this.state.dataArray.map((v,i)=>{
                        return <li key={i}>
                            id:{v.id} 商品名:{v.name} 价格:{v.price} 数量:{v.count} <button>删除</button>
                        </li>
                    })
                }

            </div>
        );
    }
}

export default ReduxTwo;